# backend/schemas/subscription.py
from datetime import datetime
from uuid import UUID
from pydantic import BaseModel


class SubscriptionBase(BaseModel):
    name: str
    duration_days: int
    data_limit_gb: int | None = None
    price: float
    is_active: bool = True
    description: str | None = None


class SubscriptionCreate(SubscriptionBase):
    pass


class SubscriptionUpdate(BaseModel):
    name: str | None = None
    price: float | None = None
    is_active: bool | None = None


class SubscriptionOut(SubscriptionBase):
    id: UUID
    created_at: datetime

    class Config:
        from_attributes = True